'use strict';
module.exports = app => {
  app.once('server', () => {
    // websocket
  });
  app.on('error', (err, ctx) => {
    // report error
    ctx.body = {
      code: 500,
    };
  });
  app.on('request', () => {
    // log receive request
  });
  app.on('response', () => {
    // ctx.starttime is set by framework
    // const used = Date.now() - ctx.starttime;
    // log total cost
  });
};
